extends Control


var data = null

signal edit(data)
signal delete(data)

func _ready():
	pass 

func set_data(data):
	self.data = data
	var id = data["id"]
	
	$hbox/id.text = str(id)
	$hbox/type.text = str(data.get("type",1))
	$hbox/ipCoin.text = str(data.get("ipCoin",1))
	
	$hbox/skill.text = DataSource.get_skill_by_id(data["skillId"])["name"]
	


func _on_edit_button_up():
	emit_signal("edit", data)


func _on_delete_button_up():
	emit_signal("delete", data)
